All Questions
49 questions
2votes
2answers
62views
How to get route value of action attribute in controller?
I have the action method defined like below: [Route("example-page")] public ActionResult MyAction() { // I want to use "example-page" in here, like a query parameter. ...
2votes
1answer
1kviews
How Can I Get Action Name of Current View while submitting a form?
I have an action method for uploading Image that is used in many Views. after uploading the image I want my method to redirect to the same view. for that I need action name to redirect it and when I ...
0votes
2answers
391views
Go to default route from any URL
Current Route // Create the front-end route. Route defaultRoute = routes.MapRoute( "CMS_Default", "CMS/RenderMvc/{action}/{id}", new { controller = "RenderMvc&...
0votes
2answers
1kviews
Using a controller with WEB API Routing
In my project (Asp.net MVC), I want to use DevExtreme GridView to display my data. I've used code first to create databases and tables. In the project, I have a model with the name of Member. I did ...
1vote
1answer
745views
MVC Core 3.0 options.LoginPath - add localization route parameter
I have the following code inside Startup - ConfigureServices: services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) .AddCookie(options => { ...
0votes
1answer
92views
Contact us form action not found
Not sure why this isn't working, but I suspect it's something to do with routing... (Using MVC5) When clicking on the submit button I get the following message: The resource cannot be found. ...
0votes
0answers
150views
Default route in MVC project with areas
I have an ASP MVC 4 project which contains areas and is structured as follows: Areas MyArea Controllers MyAreaController.cs MyAreaRegistration.cs Controllers HomeController.cs Global.asax In Global....
0votes
0answers
940views
MVC Action Method timing out resulting Error 524
I am experiencing a peculiar issue with ASP.NET MVC Routing. MVC Action Method times out every time, this happens only on the specific server, while testing the same configuration in other servers it ...
0votes
1answer
2kviews
ASP.NET MVC: RouteConfig default action
I'm new to ASP.NET MVC, and am following an online tutorial to build a sample project before I build a production project for my internship. In this project we follow the basic MVC scaffolding, and ...
0votes
1answer
6kviews
Do I need a default document on IIS for an MVC application?
Why should I create a default document in my IIS configuration when creating a web application for my MVC website when the name is customized for example Login.cshtml? I thought via MVC routing there ...
1vote
1answer
780views
How to use different name for Area in url, without renaming files
I have an Area called Vendor, which is accessed using this url: mysite.com/Vendor/Home/index This name, is only for internal use however, so I would like to change it ONLY in the url to 'All'; like ...
2votes
1answer
2kviews
Routing based on subdomain to areas while keeping same URL parameters
I'm trying to route to areas based on a subdomain while having the URL not include the Area parameter. I'd like to be able to go the following routes for example example1.domain.com/login ...
0votes
1answer
63views
Why MVC gives me 404 not found when 2 parts of url marked as UrlParameter.Optional [duplicate]
I have the following controller public class AccountController : Controller { [HttpPost] public ActionResult Login(string email, string password) { if (!...
1vote
3answers
474views
MVC custom view routing based on controller structure
I need my ASP.NET MVC5 view structure to reflect the structure of my controllers. The controllers of my application have the following structure: Controllers |--- Main | |--- HomeController.cs |---...
0votes
3answers
62views
How do I set up my Routing for my MVC Page?
Greetings New to MVC ... I am creating my first MVC Application, and I have created it as follows: CustomUtilities/Controllers/GCItemRetrievalController.cs CustomUtilities/Views/GCItemRetrieval/...